package com.hskn.hss.module.alarmcar.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hskn.hss.module.carTrack.vo.CarTrackVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AlarmCar implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "alarm_car_id", type = IdType.ASSIGN_UUID)
    private String alarmCarId;

    @TableField(exist = false)
    private String carNameAndAlarmTypeName;

    private String carId;

    private String carName;

    private String depId;
    @TableField(exist = false)
    private String depTypeId;

    private String depName;

    private String alarmTypeId;

    private String alarmTypeName;

    private String lng;

    private String lat;

    private String address;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date alarmTime;

    //日期
    @TableField(exist = false)
    private String alarmDate;

    private String content;

    private String dealType;

    private String dealRemark;
    private String carTypeId;
    private String carTypeName;
    private String carTrackStartId;
    private String carTrackEndId;

    private Integer isKeep;
    @TableField(exist = false)
    private String expType;
    @TableField(exist = false)
    private String itemId;

    private String dealUid;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date alarmStartTime;
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date alarmEndTime;

    @TableField(exist = false)
    List<CarTrackVo> dangerList;
    @TableField(exist = false)
    private Integer messageType;
    @TableField(exist = false)
    private String id;
    @TableField(exist = false)
    private Date time;
    @TableField(exist = false)
    private List<String> depIds;
    @TableField(exist = false)
    private String date;


    public AlarmCar(String alarmCarId, String dealType, String dealRemark, String dealUid) {
        this.alarmCarId = alarmCarId;
        this.dealType = dealType;
        this.dealRemark = dealRemark;
        this.dealUid = dealUid;
    }

    public AlarmCar() {
    }
    @TableField(exist = false)
    private String carHeadPortraitAlarm;

    private BigDecimal alarmValue;

    private BigDecimal oilLeakageValue;

    /**
     * 是否已读(0未读  1已读)
     */
    @TableField(exist = false)
    private Integer isRead;
    /**
     * 车牌号
     */
    @TableField(exist = false)
    private String carnumber;
    /**
     * 开始时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;
    @TableField(exist = false)
    private Integer pageNum;
    @TableField(exist = false)
    private Integer pageSize;
    //日期类型(1按天查询  2按月查询)
    @TableField(exist = false)
    private String dateType;

    /**
     * 导出用list
     */
    @TableField(exist = false)
    private List<String> carNames;
    @TableField(exist = false)
    private List<String> AlarmTimes;

}